.uni-search-bar {
  width: 100%;
  height: 70rpx;
  display: flex;
  align-items: center;
  justify-content: center;

  .search-bar-center {
    flex: 1;
    height: 100%;
    padding: 0 30rpx;
    border-radius: 40rpx;
    background-color: #DDDEE0;
    display: flex;
    align-items: center;
    justify-content: center;
    .fa-search {
      color: $uni-color-info;
      font-size: 40rpx;
    }
    .search-input {
      flex: 1;
      margin: 0 20rpx;
      .uni-input-input {
        font-size: 32rpx;
      }
    }
    .fa-plus-circle {
      color: $uni-color-info;
      font-size: 40rpx;
      transform: rotate(45deg);
    }
  }

  .search-bar-right {
    display: flex;
    padding: 0 30rpx;
    .search-bar-cancel {
      font-size: 28rpx;
      font-weight: 500;
      color: $uni-color-info;
    }
    .search-bar-confirm {
      font-size: 28rpx;
      font-weight: 500;
      color: $uni-color-primary;
    }
  }
}

.page-index {
  padding: 30rpx;
  box-sizing: border-box;
  .weather-info {
    padding: 100rpx 0;
    .weather-info-num {
      font-size: 140rpx;
    }
  }
  .weather-desc {
    margin-top: 20rpx;
    overflow: auto;
    height: 240rpx;
    border-radius: 30rpx;
    padding: 30rpx;
    padding-bottom: 0rpx;
    box-sizing: border-box;
    background-color: rgba(63, 99, 211, 0.8);
    swiper,
    uni-swiper {
      height: 190rpx;
      .uni-swiper-dots-horizontal {
        bottom: 0rpx;
      }
    }
  }
  .weather-recently {
    margin-top: 20rpx;
    overflow: auto;
    height: 240rpx;
    border-radius: 30rpx;
    padding: 20rpx;
    box-sizing: border-box;
    white-space: nowrap;
    background-color: rgba(63, 99, 211, 0.8);
  }
  .weather-future {
    margin-top: 20rpx;
    border-radius: 30rpx;
    padding: 30rpx;
    box-sizing: border-box;
    background-color: rgba(63, 99, 211, 0.8);
    .weather-future-more {
      width: 100%;
      height: 80rpx;
      color: #ffffff;
      font-size: 32rpx;
      border-radius: 40rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #4F70D7;
    }
  }
}

.page-city-management {
  height: 100%;
  padding: 30rpx;
  box-sizing: border-box;
  position: relative;
  .city-list {
    .city-item {
      height: 180rpx;
      margin-top: 20rpx;
      padding: 30rpx;
      box-sizing: border-box;
      border-radius: 30rpx;
      background: linear-gradient(#2D52C8 0%, #728DE6 100%);
    }
    .city-item-delete {
      width: 140rpx;
      height: 180rpx;
      margin-top: 20rpx;
      margin-left: 20rpx;
      box-sizing: border-box;
      border-radius: 30rpx;
      background-color: #dd524d;
      .fa-trash-o {
        font-size: 60rpx;
        color: #ffffff;
      }
    }
  }
  .city-plus {
    right: 30rpx;
    bottom: 60rpx;
    width: 120rpx;
    height: 120rpx;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2667FF;
    .fa-plus {
      color: #ffffff;
      font-size: 60rpx;
    }
  }
}

.page-city-choose {
  height: 100%;
  padding: 30rpx;
  padding-top: 0;
  box-sizing: border-box;
  .fa-angle-down,
  .fa-angle-right {
    font-size: 50rpx;
  }
  .border-bottom {
    border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  }
  .fa-square-o {
    font-size: 50rpx;
  }
  .fa-check-square {
    font-size: 46rpx;
  }
  button {
    background-color: $uni-color-primary;
  }
}

/* 蓝色预警（一般/IV级） */
.warning-blue {
  color: #1890ff;
}

/* 黄色预警（较严重/III级） */
.warning-yellow {
  color: #fadb14;
}

/* 橙色预警（严重/II级） */
.warning-orange {
  color: #fa8c16;
}

/* 红色预警（特别严重/I级） */
.warning-red {
  color: #f5222d;
}

/* 晴天效果背景 */
.sunny-sky {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: linear-gradient(#2D52C8 0%, #728DE6 100%);
  .sun {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #FFD700;
    border-radius: 50%;
    /* #ifdef H5 */
    top: 120px;
    /* #endif */
    /* #ifndef H5 */
    top: 80px;
    /* #endif */
    left: 40px;
    box-shadow: 0 0 50px #FFD700;
    animation: sunPulse 3s infinite ease-in-out, sunMove 15s infinite linear;
    z-index: 2;
  }
  .sun-rays {
    position: absolute;
    width: 100px;
    height: 100px;
	/* #ifdef H5 */
	top: 100px;
	/* #endif */
	/* #ifndef H5 */
	top: 60px;
	/* #endif */
    left: 20px;
    background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, rgba(255,215,0,0) 70%);
    border-radius: 50%;
    animation: raysExpand 4s infinite alternate, raysRotate 20s infinite linear;
    z-index: 1;
  }
  /* 太阳脉动效果 */
  @keyframes sunPulse {
    0%, 100% {
      box-shadow: 0 0 50px #FFD700;
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 80px #FFA500;
      transform: scale(1.05);
    }
  }
  /* 太阳移动轨迹 */
  @keyframes sunMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(20px, -10px); }
    50% { transform: translate(0, -20px); }
    75% { transform: translate(-20px, -10px); }
    100% { transform: translate(0, 0); }
  }
  /* 光线扩散效果 */
  @keyframes raysExpand {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 0.9; }
  }
  /* 光线旋转效果 */
  @keyframes raysRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}

/* 多云效果背景 */
.cloudy {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: linear-gradient(#2D52C8 0%, #728DE6 100%);

  .cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    filter: blur(5px);
    border-radius: 50%;
  }

  @for $i from 1 through 30 {
    .cloud:nth-child(#{$i}) {
      $times: 5 + random(5);
      $reverse: reverse;
      @if ($i % 2)==0 {
        $reverse: reverse;
      }
      @else {
        $reverse: auto;
      }
      width: #{100 + random(100)}px;
      height: #{20 + random(40)}px;
      top: #{40 + random(100)}px;
      left: #{-100 + random(300)}px;
      animation: cloudMove #{$times}s infinite $reverse;
    }
  }

  @keyframes cloudMove {
    0% { transform: translateX(-80%); }
    100% { transform: translateX(80%); }
  }
}

/* 阴天效果背景 */
.overcast {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: linear-gradient(#778899 0%, #C0C0C0 100%);

  .cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    filter: blur(5px);
    border-radius: 50%;
  }

  @for $i from 1 through 30 {
    .cloud:nth-child(#{$i}) {
      $times: 5 + random(5);
      $reverse: reverse;
      @if ($i % 2)==0 {
        $reverse: reverse;
      }
      @else {
        $reverse: auto;
      }
      width: #{100 + random(100)}px;
      height: #{40 + random(40)}px;
      top: #{40 + random(100)}px;
      left: #{-100 + random(300)}px;
      animation: cloudMove #{$times}s infinite $reverse;
    }
  }

  @keyframes cloudMove {
    0% { transform: translateX(-80%); }
    100% { transform: translateX(80%); }
  }
}

/* 雨天效果背景 */
.rainy {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: linear-gradient(#708090 0%, #A9A9A9 100%);

  .cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    filter: blur(5px);
    border-radius: 50%;
  }

  @for $i from 1 through 30 {
    .cloud:nth-child(#{$i}) {
      $times: 5 + random(5);
      $reverse: reverse;
      @if ($i % 2)==0 {
        $reverse: reverse;
      }
      @else {
        $reverse: auto;
      }
      width: #{100 + random(100)}px;
      height: #{40 + random(40)}px;
      top: #{0 + random(100)}px;
      left: #{-100 + random(300)}px;
      animation: cloudMove #{$times}s infinite $reverse;
    }
  }

  @keyframes cloudMove {
    0% { transform: translateX(-80%); }
    100% { transform: translateX(80%); }
  }

  @for $i from 1 through 100 {
    .rain-#{$i} {
      $delay: random(10) * 0.1s;
      position: absolute;
      width: #{1 + random(2)}px;
      height: #{10 + random(5)}px;
      background-color: rgba(255, 255, 255, 0.2);
      top: #{-50 + random(20)}px;
      left: #{10 + random(400)}px;
      animation: rainFall 1s infinite linear $delay;
    }
  }

  @keyframes rainFall {
    0% { transform: translateY(0) translateX(0); opacity: 1; }
    100% { transform: translateY(400px) translateX(0); opacity: 0.2; }
  }
}

/* 晚上效果背景 */
.night-sky {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  position: fixed;
  background: linear-gradient(#0F2027 0%, #203A43 50%, #2C5364 100%);

  // 月亮样式
  .moon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(245, 245, 220, 0.8);
    border-radius: 50%;
    top: 6%;
    right: 15%;
    box-shadow: 0 0 30px rgba(245, 245, 220, 0.6), 0 0 60px rgba(245, 245, 220, 0.3);
    animation: moon-glow 4s ease-in-out infinite alternate;
  }

  @keyframes moon-glow {
    0% { opacity: 0.9; box-shadow: 0 0 20px rgba(245, 245, 220, 0.6); }
    100% { opacity: 1; box-shadow: 0 0 50px rgba(245, 245, 220, 0.8); }
  }

  // 生成200颗随机星星
  @for $i from 1 through 200 {
    .star-#{$i} {
      position: absolute;
      width: (random(3) + 1) + px;
      height: (random(3) + 1) + px;
      background: white;
      border-radius: 50%;
      top: 0% + random(100);
      left: 0% + random(100);
      opacity: random(1) * 0.1;
      animation: star-twinkle (random(5) + 3) + s ease-in-out infinite (random(5)) + s;

      // 部分大星星增加发光效果
      @if random(10) > 7 {
        box-shadow: 0 0 (random(5) + 3) + px white;
      }
    }
  }

  @keyframes star-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
  }

  // 生成3个流星
  @for $i from 1 through 3 {
    .shooting-star-#{$i} {
      position: absolute;
      width: (random(100) + 100) + px;
      height: 2px;
      background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
      top: 0% + random(30);
      left: 0% + random(30);
      transform: rotate((random(30) - 15) + deg) translateX(-150px);
      opacity: 0;
      animation: shooting-star (random(3) + 2) + s ease-in (random(15)) + s infinite;
      filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));

      // 流星尾部
      &::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
        right: 0;
        top: 50%;
        transform: translateY(-50%);
      }
    }
  }

  @keyframes shooting-star {
    0% {
      opacity: 0;
      transform: rotate(var(--rotation)) translateX(-150px);
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
      opacity: 0;
      transform: rotate(var(--rotation)) translateX(calc(100vw + 150px));
    }
  }
}

